package com.gdpu.project.dao;

import java.util.List;

import com.gdpu.page.vo.QueryResult;
import com.gdpu.project.vo.News;

public interface NewsDao {

	public abstract void save(News transientInstance);

	public abstract void delete(News persistentInstance);

	public abstract News findById(java.lang.Integer id);

	public abstract List<News> findByExample(News instance);

	public abstract List<News> findByProperty(String propertyName, Object value);

	public abstract List<News> findByNewsType(Object newsType);

	public abstract List<News> findByNewsTitle(Object newsTitle);

	public abstract List<News> findByNewsInfo(Object newsInfo);

	public abstract List<News> findByClickRate(Object clickRate);

	public abstract List<News> findAll();
	/**
	 * 分页显示新闻
	 * @param firstindex
	 * @param maxresult
	 * @return
	 */
	public QueryResult<News> findAll(int firstindex,int maxresult);

	public abstract News merge(News detachedInstance);

	public abstract void attachDirty(News instance);

	public abstract void attachClean(News instance);
	
	public abstract List<News> findRecentNews();
	
	public abstract List<News> splitPage(int startRow);
}